import java.util.Scanner;

public class Text9 {
    public static void main(String[] args) {
        //        9.输入一个数，
//          打印其所有约数以及所有约数的和
        Scanner ab = new Scanner(System.in);
        int a = ab.nextInt();
        int b = 1;
        int c = 0;
        while (b <= a) {
            if (a % b == 0) {
                System.out.println(b);
                c += b;
            }
            b++;
        }
        System.out.println(c);


    }
}
